package com.hst.web.base.proxy;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;

import com.hst.core.Page;
import com.hst.core.dao.IORDao;
import com.hst.core.dao.ORQuery;
import com.hst.core.dao.ORQuery.Op;
import com.hst.core.meta.proxies.DefaultDataProxy;
import com.hst.web.base.entity.TVehicleInfo;
import com.hst.web.base.service.UserRoleService;

public class VehicleReviewProxy extends DefaultDataProxy {

	@Autowired
	IORDao dao;

	@Autowired
	UserRoleService urService;

	/**
	 * 审核状态：审核通过
	 */
	private static final String CHECK_STATUS_OK = "2";

	@Override
	public Page<?> list(Map<String, ?> query, int pageIdx) {
		List<ORQuery> querys = parseQuery(query);
		querys.add(new ORQuery(Op.eq, "checkStatus", CHECK_STATUS_OK));
		return dao.list(TVehicleInfo.class, querys, pageIdx);
	}

}
